{{define "9IPHP/header"}}
<header class="header">
    <div class="wrapper fn__clear">
        <h1 class="header__logo">
            <a href="{{.BlogURL}}">
                <span data-src="{{.LogoURL}}"></span>
                {{.Setting.BasicBlogTitle}}
            </a>
        </h1>
        <span class="header__sub-title">
            {{.Setting.BasicBlogSubtitle}}
        </span>
        <svg class="fn__none"><use xlink:href="#icon-toc"></use></svg>
        <span class="fn__right">
            {{if eq .User.URole 0}}
             <a href="{{.Conf.Server}}/start" class="header__btn ft-orange">{{.I18n.StartToUse}}</a>
            {{else}}
            <a class="avatar pipe-tooltipped pipe-tooltipped--w"
               aria-label="{{.I18n.manage}}"
               href="{{.Conf.Server}}/{{if ne .User.URole 4}}admin/{{end}}"
               data-src="{{.User.AvatarURLWithSize 64}}"></a>
            {{end}}
        </span>
    </div>
</header>
<nav class="fn__none mobile__nav">
    <a href="{{.BlogURL}}">
        <svg>
            <use xlink:href="#icon-home"></use>
        </svg>
        {{.I18n.Index}}
    </a>
    <a href="{{.BlogURL}}/categories">
        <svg>
            <use xlink:href="#icon-folders"></use>
        </svg>
        {{.I18n.Categories}}
    </a>
    <a href="{{.BlogURL}}/tags">
        <svg>
            <use xlink:href="#icon-tag"></use>
        </svg>
        {{.I18n.Tags}}
    </a>
    <a href="{{.BlogURL}}/archives">
        <svg>
            <use xlink:href="#icon-bookmark"></use>
        </svg>
        {{.I18n.Archives}}
    </a>
    {{if gt .UserCount 1}}
    <a href="{{.BlogURL}}/authors">
        <svg>
            <use xlink:href="#icon-group"></use>
        </svg>
        {{.I18n.Team}}
    </a>
    {{end}}
    {{range .Navigations}}
    <a href="{{.URL}}" target="{{.OpenMethod}}">
        {{if ne "" .IconURL}}
        <img class="header__icon"
             data-src="{{.IconURL}}"/>
        {{end}}
        {{.Title}}
    </a>
    {{end}}
    <a href="{{.BlogURL}}/atom" target="_blank">
        <svg>
            <use xlink:href="#icon-feed"></use>
        </svg>
        {{.I18n.Feed}}
    </a>
    <a href="{{.BlogURL}}/search" target="_blank">
        <svg>
            <use xlink:href="#icon-search"></use>
        </svg>
        {{.I18n.Search}}
    </a>
    {{if eq .User.URole 0}}
    <a href="{{.Conf.Server}}/start">{{.I18n.StartToUse}}</a>
    {{else}}
    <a href="{{.Conf.Server}}/{{if ne .User.URole 4}}admin/{{end}}">
        <svg>
            <use xlink:href="#icon-setting"></use>
        </svg>
        {{.I18n.manage}}
    </a>
    {{end}}
</nav>
<nav class="nav">
    <div class="wrapper fn__clear">
        <a href="{{.BlogURL}}">
            <svg>
                <use xlink:href="#icon-home"></use>
            </svg>
            {{.I18n.Index}}
        </a>
        <a href="{{.BlogURL}}/categories">
            <svg>
                <use xlink:href="#icon-folders"></use>
            </svg>
            {{.I18n.Categories}}
        </a>
        <a href="{{.BlogURL}}/tags">
            <svg>
                <use xlink:href="#icon-tag"></use>
            </svg>
            {{.I18n.Tags}}
        </a>
        <a href="{{.BlogURL}}/archives">
            <svg>
                <use xlink:href="#icon-bookmark"></use>
            </svg>
            {{.I18n.Archives}}
        </a>
        {{if gt .UserCount 1}}
        <a href="{{.BlogURL}}/authors">
            <svg>
                <use xlink:href="#icon-group"></use>
            </svg>
            {{.I18n.Team}}
        </a>
        {{end}}
        {{range .Navigations}}
        <a href="{{.URL}}" target="{{.OpenMethod}}">
            {{if ne "" .IconURL}}
            <img class="header__icon"
                 data-src="{{.IconURL}}"/>
            {{end}}
            {{.Title}}
        </a>
        {{end}}
        <a href="{{.BlogURL}}/atom" target="_blank">
            <svg>
                <use xlink:href="#icon-feed"></use>
            </svg>
            {{.I18n.Feed}}
        </a>

        <form class="nav__search" action="{{.BlogURL}}/search">
            <input placeholder="{{.I18n.Search}}" type="text" name="key">
            <button type="submit">
                <svg>
                    <use xlink:href="#icon-search"></use>
                </svg>
            </button>
        </form>
    </div>
</nav>
{{end}}